package neuron.library.ga.mutation;

import java.util.Random;

import neuron.library.ga.AbstractGeneticMachine;
import neuron.library.ga.common.AbstractChromosome;
import neuron.library.ga.common.Population;

/*
 * TODO: Comment!!
 */
public class RandomLowRateMutation extends MutationStrategy {

	public RandomLowRateMutation(AbstractGeneticMachine gm) {
		super(gm);
	}

	@Override
	public void mutation(Population population) {
		Random rand = new Random();
		
		for (AbstractChromosome chromosome: population) {
			if (rand.nextInt(1000)%1000 == 0) {
				chromosome.performMutation();
			}
		}
		
	}

}
